<!-- START OF LEFT PANEL -->
<div class="leftpanel">

    <div class="logopanel">
        <h1><a href="<?php echo $this->createUrl('/admin')?>">Admin Area <span><?php echo $this->domain?></span></a></h1>
    </div><!--logopanel-->

    <div class="datewidget">Today is <?php echo date('l, M d, Y')?></div>

    <div class="searchwidget">
        <form action="<?php echo $this->createUrl('/admin/branch')?>" method="get">
            <div class="input-append">
                <input type="text" name="Branch[name]" <?php if(isset($_GET['Branch']['name'])) echo "value='{$_GET['Branch']['name']}'"?> class="span2 search-query" placeholder="Tên cửa hàng ...">
                <button type="submit" class="btn"><span class="icon-search"></span></button>
            </div>
        </form>
    </div><!--searchwidget-->

    <div class="leftmenu">        
        <ul class="nav nav-tabs nav-stacked">
            <li class="nav-header">Main Navigation</li>
            
            <li><a href="<?php echo $this->createUrl('/admin')?>"><span class="icon-align-justify"></span> Dashboard</a></li>
            
            
            <?php if($this->manager->isStaffOnly):?>
            <li <?php if($this->menu_parent_selected == 'manager'):?> class="active"<?php endif?>>
                <a href="<?php echo $this->createUrl('/admin/manager/update')?>"><span class="icon-user"></span> Tài khoản</a>
            </li>
            <?php else:?>
            <li class="dropdown <?php if($this->menu_parent_selected == 'manager'):?>active<?php endif?>">
                <a href="<?php echo $this->createUrl('/admin/manager')?>">
                    <span class="icon-user"></span> Nhân viên
                </a>
                <ul class="<?php echo ($this->menu_parent_selected == 'manager') ? 'opened':'closed'?>">
                    <li<?php if($this->menu_child_selected == 'manager_create'):?> class="active"<?php endif?>><a href="<?php echo $this->createUrl('/admin/manager/create')?>">Thêm mới</a></li>
                    <li<?php if($this->menu_child_selected == 'manager'):?> class="active"<?php endif?>><a href="<?php echo $this->createUrl('/admin/manager')?>">Quản lý</a></li>
                </ul>
            </li>
            <?php endif?>
    

            <li class="dropdown <?php if($this->menu_parent_selected == 'branch'):?>active<?php endif?>">
                <a href="<?php echo $this->createUrl('/admin/branch')?>">
                    <span class="icon-home"></span> Cửa hàng
                </a>
                <ul class="<?php echo ($this->menu_parent_selected == 'branch') ? 'opened':'closed'?>">
                    <li<?php if($this->menu_child_selected == 'branch_create'):?> class="active"<?php endif?>><a href="<?php echo $this->createUrl('/admin/branch/create')?>">Thêm mới</a></li>
                    <li<?php if($this->menu_child_selected == 'branch'):?> class="active"<?php endif?>><a href="<?php echo $this->createUrl('/admin/branch')?>">Quản lý</a></li>
                    <li<?php if($this->menu_child_selected == 'branch_copy'):?> class="active"<?php endif?>><a href="<?php echo $this->createUrl('/admin/branch', array('action' => 'copy'))?>">Quản lý (copy)</a></li>
                    <li<?php if($this->menu_child_selected == 'branch_group'):?> class="active"<?php endif?>><a href="<?php echo $this->createUrl('/admin/branch/group')?>">Gộp các chi nhánh</a></li>
                </ul>
            </li>
            
            <li class="dropdown <?php if($this->menu_parent_selected == 'comment'):?>active<?php endif?>">
                <a href="<?php echo $this->createUrl('/admin/comment')?>">
                    <span class="icon-comment"></span> Comment
                </a>
                <ul class="<?php echo ($this->menu_parent_selected == 'comment') ? 'opened':'closed'?>">
                    <li<?php if($this->menu_child_selected == 'comment'):?> class="active"<?php endif?>><a href="<?php echo $this->createUrl('/admin/comment')?>">Quản lý comment</a></li>
                </ul>
            </li>
            <li class="dropdown <?php if($this->menu_parent_selected == 'event'):?>active<?php endif?>">
                <a href="<?php echo $this->createUrl('/admin/event')?>">
                    <span class="icon-fire"></span> Event
                </a>
                <ul class="<?php echo ($this->menu_parent_selected == 'event') ? 'opened':'closed'?>">
                    <li<?php if($this->menu_child_selected == 'event_create'):?> class="active"<?php endif?>><a href="<?php echo $this->createUrl('/admin/event/create')?>">Thêm event</a></li>
                    <li<?php if($this->menu_child_selected == 'event'):?> class="active"<?php endif?>><a href="<?php echo $this->createUrl('/admin/event')?>">Quản lý event</a></li>
                </ul>
            </li>
            <li class="dropdown <?php if($this->menu_parent_selected == 'item'):?>active<?php endif?>">
                <a href="<?php echo $this->createUrl('/admin/item')?>">
                    <span class="icon-glass"></span> Món ăn, uống
                </a>
                <ul class="<?php echo ($this->menu_parent_selected == 'item') ? 'opened':'closed'?>">
                    <li<?php if($this->menu_child_selected == 'item'):?> class="active"<?php endif?>><a href="<?php echo $this->createUrl('/admin/item')?>">Quản lý món ăn</a></li>
                </ul>
            </li>
            <li class="dropdown <?php if($this->menu_parent_selected == 'publicLocation'):?>active<?php endif?>">
                <a href="<?php echo $this->createUrl('/admin/publicLocation')?>">
                    <span class="icon-star"></span> Địa điểm công cộng
                </a>
                <ul class="<?php echo ($this->menu_parent_selected == 'publicLocation') ? 'opened':'closed'?>">
                    <li<?php if($this->menu_child_selected == 'publicLocation_create'):?> class="active"<?php endif?>><a href="<?php echo $this->createUrl('/admin/publicLocation/create')?>">Thêm mới</a></li>
                    <li<?php if($this->menu_child_selected == 'publicLocation'):?> class="active"<?php endif?>><a href="<?php echo $this->createUrl('/admin/publicLocation')?>">Quản lý</a></li>
                </ul>
            </li>
            
            <li class="dropdown <?php if($this->menu_parent_selected == 'param'):?>active<?php endif?>">
                <a href="<?php echo $this->createUrl('/admin/param')?>">
                    <span class="icon-tag"></span> Param
                </a>
                <ul class="<?php echo ($this->menu_parent_selected == 'param') ? 'opened':'closed'?>">
                    <li<?php if($this->menu_child_selected == 'param_create'):?> class="active"<?php endif?>><a href="<?php echo $this->createUrl('/admin/param/create')?>">Thêm param</a></li>
                    <li<?php if($this->menu_child_selected == 'param'):?> class="active"<?php endif?>><a href="<?php echo $this->createUrl('/admin/param')?>">Quản lý</a></li>
                </ul>
            </li>
            
            <li class="dropdown <?php if($this->menu_parent_selected == 'handBook'):?>active<?php endif?>">
                <a href="<?php echo $this->createUrl('/admin/handBook')?>">
                    <span class="icon-book"></span> Cẩm nang
                </a>
                <ul class="<?php echo ($this->menu_parent_selected == 'handBook') ? 'opened':'closed'?>">
                    <li<?php if($this->menu_child_selected == 'handBook_create'):?> class="active"<?php endif?>><a href="<?php echo $this->createUrl('/admin/handBook/create')?>">Thêm cẩm nang</a></li>
                    <li<?php if($this->menu_child_selected == 'handBook'):?> class="active"<?php endif?>><a href="<?php echo $this->createUrl('/admin/handBook')?>">Quản lý</a></li>
                    <li<?php if($this->menu_child_selected == 'handBook_cat'):?> class="active"<?php endif?>><a href="<?php echo $this->createUrl('/admin/handBook/cat')?>">Thêm danh mục cẩm nang</a></li>
                </ul>
            </li>
            <li class="dropdown <?php if($this->menu_parent_selected == 'review'):?>active<?php endif?>">
                <a href="<?php echo $this->createUrl('/admin/review')?>">
                    <span class="icon-thumbs-up"></span> PR/review
                </a>
                <ul class="<?php echo ($this->menu_parent_selected == 'review') ? 'opened':'closed'?>">
                    <li<?php if($this->menu_child_selected == 'review_create'):?> class="active"<?php endif?>><a href="<?php echo $this->createUrl('/admin/review/create')?>">Thêm PR/review</a></li>
                    <li<?php if($this->menu_child_selected == 'review'):?> class="active"<?php endif?>><a href="<?php echo $this->createUrl('/admin/review')?>">Quản lý</a></li>
                </ul>
            </li>
            
            <li class="dropdown <?php if($this->menu_parent_selected == 'tool'):?>active<?php endif?>">
                <a href="<?php echo $this->createUrl('/admin/tool')?>">
                    <span class="icon-book"></span> Tools
                </a>
                <ul class="<?php echo ($this->menu_parent_selected == 'tool') ? 'opened':'closed'?>">
                    <li<?php if($this->menu_child_selected == 'tool_upload_branch_image'):?> class="active"<?php endif?>><a href="<?php echo $this->createUrl('/admin/tool/UploadBranchImage')?>">Upload ảnh</a></li>
                    <li<?php if($this->menu_child_selected == 'tool_geo'):?> class="active"<?php endif?>><a href="<?php echo $this->createUrl('/admin/tool/UpdateGeo')?>">Update GEO</a></li>
                </ul>
            </li>
            
<?php /*
            <li><a href="media.html"><span class="icon-picture"></span> Media</a></li>
            <li class="dropdown"><a href="#"><span class="icon-briefcase"></span> UI Elements &amp; Widgets</a>
                <ul>
                    <li><a href="elements.html">Theme Components</a></li>
                    <li><a href="bootstrap.html">Bootstrap Components</a></li>
                </ul>
            </li> 
            
            <li class="dropdown"><a href="#"><span class="icon-th-list"></span> Tables</a>
                <ul>
                    <li><a href="table-static.html">Static Table</a></li>
                    <li><a href="table-dynamic.html">Dynamic Table</a></li>
                </ul>
            </li>
            <li><a href="typography.html"><span class="icon-font"></span> Typography</a></li>
            <li><a href="charts.html"><span class="icon-signal"></span> Graph &amp; Charts</a></li>
            <li><a href="messages.html"><span class="icon-envelope"></span> Messages</a></li>
            <li><a href="buttons.html"><span class="icon-hand-up"></span> Buttons &amp; Icons</a></li>
            <li class="dropdown"><a href="#"><span class="icon-pencil"></span> Forms</a>
                <ul>
                    <li><a href="forms.html">Form Styles</a></li>
                    <li><a href="wizards.html">Wizard Form</a></li>
                    <li><a href="wysiwyg.html">WYSIWYG</a></li>
                </ul>
            </li>
            <li><a href="calendar.html"><span class="icon-calendar"></span> Calendar</a></li>
            <li><a href="animations.html"><span class="icon-play"></span> Animations</a></li>
            <li class="active dropdown"><a href="#"><span class="icon-book"></span> Other Pages</a>
                <ul style="display:block;">
                    <li><a href="404.html">404 Error Page</a></li>
                    <li><a href="invoice.html">Invoice Page</a></li>
                    <li><a href="editprofile.html">Edit Profile</a></li>
                    <li><a href="grid.html">Grid Styles</a></li>
                </ul>
            </li>
*/?>
        </ul>
    </div><!--leftmenu-->

    </div><!--mainleft-->
    <!-- END OF LEFT PANEL -->